import { requestClient } from '#/api/request'
/**
 *  获取列表
 */
export async function supplylList(params: object = {}) {
  return requestClient.get('/admin/Supply/index', params)
}

/**
 *  获取导出框架列表
 */
export async function getContractList(params: object = {}) {
  return requestClient.get('/admin/Supply/getContractList', params)
}

/**
 *  删除
 */
export async function delSupply(params: any) {
  return requestClient.get('/admin/Supply/del', params, { responseReturn: 'raw' })
}

/**
 *  反审
 */
export async function againstSupply(params: any) {
  return requestClient.post('/admin/Supply/against', params, { responseReturn: 'raw' })
}

/**
 *  反审
 */
export async function approvalSupply(params: any) {
  return requestClient.post('/admin/Supply/approval', params, { responseReturn: 'raw' })
}

/**
 *  导出
 */
export async function SupplyExcel(params: any) {
  return requestClient.post('/admin/SupplyExcel/supply_excel', params, { responseReturn: 'raw' })
}

/**
 *  获取导出合同
 */
export async function exportContract(params: any) {
  return requestClient.post('/admin/supply/exportContract', params, { responseReturn: 'raw' })
}

/**
 *  获取银行
 */
export async function getBankList() {
  return requestClient.post('/admin/Factory/getBankList', { responseReturn: 'raw' })
}

/**
 *  创建供应商
 */
export async function creatSupply(params: any) {
  return requestClient.post('/admin/supply/add', params, { responseReturn: 'raw' })
}

/**
 *  编辑供应商
 */
export async function editSupply(params: any) {
  return requestClient.post('/admin/supply/edit', params, { responseReturn: 'raw' })
}

/**
 *  编辑供应商
 */
export async function getSupply(params: any) {
  return requestClient.get('/admin/supply/edit', params)
}

/**
 *  设置默认银行
 */
export async function setDefaultRow(params: any) {
  return requestClient.post('/admin/Factory/setDefaultRow', params,{ responseReturn: 'raw' })
}
